﻿using System;
using System.Threading.Tasks;
using SmartCity.Shared;
using Volo.Abp.Application.Services;

namespace CommonManagement
{
    /// <summary>
    /// 新闻评论应用服务接口
    /// </summary>
    public interface ICommentAppService : IApplicationService
    {
        /// <summary>
        /// 分页列表
        /// </summary>
        /// <param name="request"></param>
        /// <param name="newsId"></param>
        /// <param name="userId"></param>
        /// <param name="commentDate"></param>
        Task<ListResponse<CommentDto>> PagedListAsync(PagedListRequest request, 
            int newsId, int? userId = null, DateTime? commentDate = null);

        /// <summary>
        /// 详情
        /// </summary>
        /// <param name="id"></param>
        Task<ResultResponse<CommentDto>> GetAsync(int id);

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="input"></param>
        Task<ActionResponse> CreateAsync(CommentCreateDto input);

        /// <summary>
        /// 点赞
        /// </summary>
        /// <param name="id"></param>
        Task<ActionResponse> LikeAsync(int id);
    }
}